/**
 * Created by Administrator on 2019/09/10.
 */
class Triangle(var sideA : Double,
               var sideB : Double,
               var sideC : Double) : Shape(listOf(sideA, sideB, sideC)) {
    override fun calculateArea(): Double {
        //海伦公式
        val l = perimeter / 2;
        return Math.sqrt(l * (l - sideA) * (l - sideB) * (l - sideC))
    }
}